#!/bin/bash
# 验证版本Centos7.x 版本
set -e

function main(){
  echo uninstall start
  # system env
  cd system-env
  sudo kubectl delete -f .
  
  # exportes
  cd ../exporters
  sudo kubectl delete -f .
  
  # rules
  cd ../rules
  sudo kubectl delete -f .
  
  # alertmanager
  cd ../alertmanager
  sudo kubectl delete -f .
  
  # kube-state-metrics
  cd ../kube-state-metrics
  sudo kubectl delete -f .
  
  # grafana
  cd ../grafana
  sudo kubectl delete -f .
  
  # influxdb
  cd ../influxdb
  sudo kubectl delete -f .
  
  # kapacitor
  cd ../kapacitor
  sudo kubectl delete -f .
  
  # prometheus
  cd ../
  sudo kubectl delete -f .
  echo uninstall end

check
}

function check(){
echo check
sudo kubectl -n monitoring get ds,pod,svc
}


main